home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume16 / mfold / patch01 next >
Encoding:
Internet Message Format  |  1991-02-15  |  5.7 KB

  1. From: smidt@fy.chalmers.se (Peter Smidt)
  2. Newsgroups: comp.sources.misc
  3. Subject: v16i102:  mfold - Maaniker's fold and column making, Patch01
  4. Message-ID: <1991Feb15.203918.11168@sparky.IMD.Sterling.COM>
  5. Date: 15 Feb 91 20:39:18 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: 209c6d93 7a8e5af9 afb6ce26 538e97f5
  8.  
  9. Submitted-by: Peter Smidt <smidt@fy.chalmers.se>
  10. Posting-number: Volume 16, Issue 102
  11. Archive-name: mfold/patch01
  12. Patch-To: mfold: Volume 15, Issue 82
  13.  
  14. A small but serious bug have been fixed. When mfold gets the '-n'
  15. flag, mfold 1.04 will delete lines under certain circumstances.
  16. Here is a patch to get mfold 1.05 .
  17.  
  18. (The program mfold(1) folds text and makes columns.)
  19.  
  20. Mvh   Peter Smidt
  21. -----
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of shell archive."
  29. # Contents:  patch.README patch.mfold.c
  30. # Wrapped by smidt@coco on Sat Feb  9 01:08:06 1991
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'patch.README' -a "${1}" != "-c" ; then 
  33.   echo shar: Will not clobber existing file \"'patch.README'\"
  34. else
  35. echo shar: Extracting \"'patch.README'\" \(465 characters\)
  36. sed "s/^X//" >'patch.README' <<'END_OF_FILE'
  37. X*** ../README    Sat Feb  9 01:01:03 1991
  38. X--- README    Sat Feb  9 00:59:47 1991
  39. X***************
  40. X*** 1,4 ****
  41. X! Version 1.05, last change 9 february 1991.
  42. X  
  43. X  The program mfold is a simple folding and column making program.
  44. X  unpack the files from the shar file put them in a empty
  45. X--- 1,4 ----
  46. X! Version 1.04, last change 30 september 1990.
  47. X  
  48. X  The program mfold is a simple folding and column making program.
  49. X  unpack the files from the shar file put them in a empty
  50. END_OF_FILE
  51. if test 465 -ne `wc -c <'patch.README'`; then
  52.     echo shar: \"'patch.README'\" unpacked with wrong size!
  53. fi
  54. # end of 'patch.README'
  55. fi
  56. if test -f 'patch.mfold.c' -a "${1}" != "-c" ; then 
  57.   echo shar: Will not clobber existing file \"'patch.mfold.c'\"
  58. else
  59. echo shar: Extracting \"'patch.mfold.c'\" \(2971 characters\)
  60. sed "s/^X//" >'patch.mfold.c' <<'END_OF_FILE'
  61. X*** ../mfold.c    Sat Feb  9 00:56:05 1991
  62. X--- mfold.c    Sat Feb  9 00:59:57 1991
  63. X***************
  64. X*** 13,18 ****
  65. X--- 13,21 ----
  66. X          putcolu(insert[doo]);\
  67. X      }
  68. X  #define BOT_LINES        1
  69. X+ #define STR                15
  70. X+ #define TEST_STR        25
  71. X+ #define GET_NUM_STR        25
  72. X  
  73. X  int colu_chars, colu_lines;
  74. X  int page_len = PAGE_LEN, columns = 1, lin = 0, bot_lines = BOT_LINES;
  75. X***************
  76. X*** 43,54 ****
  77. X      for ( index = 1; index < argc; index++) {
  78. X          if ( argv[index][0] != '-' ) {
  79. X              if ( index == 1 || (argv[index - 1][0] == '-' &&
  80. X!             argv[index - 1][1] != 'i' && argv[index - 1][1] != 'D' || index > 2
  81. X              && argv[index - 2][0] == '-' && (argv[index - 2][1] == 'i'
  82. X              || argv[index - 2][1] == 'D')) && !got_file ) {
  83. X                  got_file = TRUE;
  84. X                  index_file = index;
  85. X!             } else if ( index_insert != index && index_delim != index ) {
  86. X                  fprintf(stderr, "Option '%s' not allowed.\n", argv[index]);
  87. X                  usage(11);
  88. X              }
  89. X--- 46,57 ----
  90. X      for ( index = 1; index < argc; index++) {
  91. X          if ( argv[index][0] != '-' ) {
  92. X              if ( index == 1 || (argv[index - 1][0] == '-' &&
  93. X!             argv[index - 1][0] != 'i' && argv[index - 1][0] != 'D' || index > 2
  94. X              && argv[index - 2][0] == '-' && (argv[index - 2][1] == 'i'
  95. X              || argv[index - 2][1] == 'D')) && !got_file ) {
  96. X                  got_file = TRUE;
  97. X                  index_file = index;
  98. X!             } else {
  99. X                  fprintf(stderr, "Option '%s' not allowed.\n", argv[index]);
  100. X                  usage(11);
  101. X              }
  102. X***************
  103. X*** 55,61 ****
  104. X          }
  105. X          doo = index_insert != index && index_delim != index
  106. X          && index_file != index;
  107. X!         if ( argv[index][0] == '-' ) switch ( argv[index][1] ) {
  108. X              case 'i':
  109. X                  check_it(&got_insert, "-i", 8, doo, &index_insert, index + 1);
  110. X                  break;
  111. X--- 58,64 ----
  112. X          }
  113. X          doo = index_insert != index && index_delim != index
  114. X          && index_file != index;
  115. X!         switch ( argv[index][1] ) {
  116. X              case 'i':
  117. X                  check_it(&got_insert, "-i", 8, doo, &index_insert, index + 1);
  118. X                  break;
  119. X***************
  120. X*** 75,81 ****
  121. X                  check_it(&got_mrandom, "-r", 37, doo, &index_mrandom, index);
  122. X                  break;
  123. X              case 'd':
  124. X!                 check_it(&got_dyslexi, "-d", 55, doo, &dummy, index);
  125. X                  break;
  126. X              case 't':
  127. X                  check_it(&got_tab_len, "-t", 13, doo, &index_tab_len, index);
  128. X--- 78,84 ----
  129. X                  check_it(&got_mrandom, "-r", 37, doo, &index_mrandom, index);
  130. X                  break;
  131. X              case 'd':
  132. X!                 check_it(&got_dyslexi, "-d", 11, doo, &dummy, index);
  133. X                  break;
  134. X              case 't':
  135. X                  check_it(&got_tab_len, "-t", 13, doo, &index_tab_len, index);
  136. X***************
  137. X*** 457,472 ****
  138. X  putcolu(c)
  139. X  char c;
  140. X  {
  141. X-     int i;
  142. X- 
  143. X      if ( c == '\n' || col == colu_chars ) {
  144. X!         if ( c == '\n' && str_len(cur_page[lin]) == ins_len ) {
  145. X!             for ( i = 0; i < ins_len; i++ ) {
  146. X!                 cur_page[lin][i] = '\0';
  147. X!             }
  148. X!             col = 0;
  149. X!         }
  150. X!         if ( col ) advance_line();
  151. X          return;
  152. X      }
  153. X      cur_page[lin][col++] = c;
  154. X--- 460,467 ----
  155. X  putcolu(c)
  156. X  char c;
  157. X  {
  158. X      if ( c == '\n' || col == colu_chars ) {
  159. X!         advance_line();
  160. X          return;
  161. X      }
  162. X      cur_page[lin][col++] = c;
  163. END_OF_FILE
  164. if test 2971 -ne `wc -c <'patch.mfold.c'`; then
  165.     echo shar: \"'patch.mfold.c'\" unpacked with wrong size!
  166. fi
  167. # end of 'patch.mfold.c'
  168. fi
  169. echo shar: End of shell archive.
  170. exit 0
  171.  
  172. exit 0 # Just in case...
  173. -- 
  174. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  175. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  176. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  177. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  178.